package wsz.dao;

import org.springframework.stereotype.Repository;
import wsz.pojo.User;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.util.List;

/**
 * @author wsz
 * @date 2021/10/13 13:42
 **/
@Repository(value = "userDao")
public class UserDaoImpl implements UserDao {

    @PostConstruct
    public void initMethod() {
        System.out.println("initMethod");
    }

    @PreDestroy
    public void destroyMethod() {
        System.out.println("destroyMethod");
    }

    @Override
    public List<User> findAll() throws Exception {
        System.out.println("findAll");
        return null;
    }

    @Override
    public int update(User user) throws Exception {
        return 2;
    }
}
